import java.util.HashMap;
import java.util.Map;

public class HashCodeSample {
	public static void main(String[] args) {

		Map<Arac, String> aracMap = new HashMap<>();

		Arac arac1 = new Arac("marka", "renk", 1);
		Arac arac2 = new Arac("marka2", "renk2", 2);

		aracMap.put(arac1, "1");
		aracMap.put(arac2, "2");

		// System.out.println(aracMap.get(arac1));
		// System.out.println(aracMap.get(arac2));

		for (Map.Entry entry : aracMap.entrySet()) {
			System.out.println(entry.getKey());
			System.out.println(entry.getValue());
		}

		// System.out.println(aracMap);
	}
}
